package com.xyh.log;

import com.xyh.HelloClient;
import com.xyh.interceptor.MyInterceptor;
import feign.Feign;
import feign.Logger;

public class LogMain {
    public static  void main(String [] args){
        HelloClient client= Feign.builder()
                .logLevel(Logger.Level.FULL)//.NONE 默认值 不记录日志 Basic
                .logger(new Logger.JavaLogger().appendToFile("logs/http.log"))
                .requestInterceptor(new MyInterceptor()).target(HelloClient.class,"http://localhost:8080");
        String result=client.hello();
        System.out.println(result);
    }
}
